﻿CREATE TABLE [dbo].[AlertSubscription] (
    [AlertSubscriptionID] UNIQUEIDENTIFIER NOT NULL,
    [AlertID]             UNIQUEIDENTIFIER NOT NULL,
    [Active]              BIT              NOT NULL,
    [Subscriber]          VARCHAR (255)    NOT NULL,
    [IsGroup]             BIT              NOT NULL,
    [CustomEmail]         VARCHAR (255)    NULL,
    [UseStartAndEndTime]  BIT              NOT NULL,
    [StartUTCHour]        TINYINT          NULL,
    [StartUTCMinute]      TINYINT          NULL,
    [EndUTCHour]          TINYINT          NULL,
    [EndUTCMinute]        TINYINT          NULL,
    [BlackOutStartDate]   DATETIME         NULL,
    [BlackOutEndDate]     DATETIME         NULL,
    [LastFired]           DATETIME         NULL,
    [IntervalMinutes]     SMALLINT         NOT NULL,
    [InsertedDate]        DATETIME         NOT NULL,
    [InsertedBy]          VARCHAR (50)     NOT NULL,
    [ModifiedDate]        DATETIME         NULL,
    [ModifiedBy]          VARCHAR (50)     NULL
);

